package com.frxuexi.cart.adapter

import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.cart.R
import com.frxuexi.cart.databinding.ItemCartBinding
import com.frxuexi.cart.databinding.ItemPreOrderBinding
import com.frxuexi.lib_base.entity.CartBeanItem

class PreOrderAdapter:BaseQuickAdapter<CartBeanItem,BaseViewHolder>(R.layout.item_pre_order) {
    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemPreOrderBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: CartBeanItem) {
        val binding = DataBindingUtil.getBinding<ItemPreOrderBinding>(helper.itemView)!!
        binding.bean=item
    }
}